package com.os.opencv.java.chapter2;

import org.opencv.core.*;

public class BasicStructure {

    public static void main(String[] args) {
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

        //创建一个point对象并在控制台输出
        Point point = new Point(10, 20);
        System.out.println("point: " + point);
        System.out.println(point.x + ", " + point.y);

        //创建1个rect对象并在控制台输出
        Rect rect = new Rect(10, 20, 50 ,100);
        System.out.println("rect: " + rect);
        System.out.println(rect.x + ", " + rect.y + ", " + rect.size());

        //创建一个size对象并在控制台输出
        Size size = new Size(50, 100);
        System.out.println("size: " + size);
        System.out.println(size.width + ", " + size.height);

        //创建一个scalar对象并在控制台输出
        Scalar scalar = new Scalar(0, 0, 255);
        System.out.println("red: " + rect);
    }
}
